package com.xinyi.httpdemo.model;

/**
 * @author 杨耿雷
 * @date 2024/9/24 13:57
 * @description 数据请求的响应体
 */
public class ResponseData {

    /**
     * 响应码
     */
    private int code = 0;

    /**
     * 响应消息
     */
    private String message;

    /**
     * 响应数据
     */
    private Object data;

    /**
     * 是否成功
     */
    private boolean success = true;

    public ResponseData() { }

    public ResponseData(int code, boolean success, Object data, String message) {
        this.code = code;
        this.success = success;
        this.data = data;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }
}
